package com.cyk.controller;

import com.cyk.feign.UserClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/blog")
public class BlogController {

    @Value("${server.port}")
    private Integer port;

    @Autowired
    private UserClient userClient;

    @GetMapping
    public String startOk() {
        String userStartLog = userClient.startOk();
        return "blog start ok! port: " + port + "\n" + userStartLog;
    }

}
